<template>
  <div class="detail">
    <!-- 医院名字与医院等级的结构 -->
    <div class="top">
      <div class="name">{{ hospitalStore.hospitalInfo.hospital?.hosname }}</div>
      <div class="level">
        <el-icon><Promotion /></el-icon>
        <span>{{ hospitalStore.hospitalInfo.hospital?.param.hostypeString }}</span>
      </div>
    </div>
    <!-- 医院的logo与路线 -->
    <div class="logo">
      <div class="left">
        <img :src="`data:image/jpeg;base64,${hospitalStore.hospitalInfo.hospital?.logoData}`" alt="" />
      </div>
      <div class="right">
        <div class="address">
          <el-icon><Promotion /></el-icon>
          <span>具体位置:{{ hospitalStore.hospitalInfo.hospital?.param.fullAddress }}</span>
        </div>
        <div class="route">规划路线:{{ hospitalStore.hospitalInfo.hospital?.route }}</div>
      </div>
    </div>
    <!-- 医院介绍 -->
    <div class="footer">
      <h1>医院介绍</h1>
      <p>
        {{ hospitalStore.hospitalInfo.hospital?.intro }}
      </p>
    </div>
  </div>
</template>

<script setup lang="ts">
//获取医院详情仓库数据进行展示
import useDetailStore from "@/store/modules/hospitalDetail";
let hospitalStore = useDetailStore();
</script>

<style scoped lang="scss">
.detail {
  .top {
    display: flex;
    align-items: center;

    .name {
      font-size: 30px;
      font-weight: 900;
    }

    .level {
      color: #7f7f7f;
      margin-left: 10px;

      span {
        margin-left: 5px;
      }
    }
  }

  .logo {
    display: flex;
    margin: 10px 0px;

    .left {
      img {
        width: 80px;
        height: 80px;
        border-radius: 50%;
      }
    }

    .right {
      color: #7f7f7f;
      margin-left: 10px;

      div {
        margin: 10px 0px;
      }
    }
  }

  .footer {
    color: #7f7f7f;

    p {
      margin-top: 10px;
      line-height: 30px;
    }
  }
}
</style>
